package com.ruoyi.system.domain.module.wx;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import org.apache.poi.hpsf.Decimal;

import java.io.Serializable;
import java.util.Date;
import java.math.BigDecimal;
import java.util.List;

/**
 * 微信端用户对象 wx_user
 *
 * @author ruoyi
 * @date 2021-08-11
 */
@Data
@NoArgsConstructor
@Accessors(chain = true)
@TableName("wx_user")
public class WxUser implements Serializable {

    private static final long serialVersionUID=1L;


    /**
     * $column.columnComment
     */
    @TableId(value = "id")
    private Integer id;

    /**
     * $column.columnComment
     */
    private String userNo;


    private String platform;

    /**
     * 昵称
     */
    @Excel(name = "昵称")
    private String nickName;

    /**
     * $column.columnComment
     */
    private String realName;

    /**
     * $column.columnComment
     */
    @Excel(name = "手机号")
    private String phoneNum;

    /**
     * 头像地址
     */
    private String faceUrl;

    /**
     * 所处省份
     */
    private String province;

    /**
     * 所处城市
     */
    private String city;

    /**
     * $column.columnComment
     */
    private String sessionKey;

    /**
     * 注册时间
     */
    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    /**
     * 最后一次的登录时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date lastActiveTime;

    /**
     * 最后的登录ip
     */
    private String lastLoginIp;

    /**
     * 微信的openid
     */
    private String openId;

    /**
     * 微信的unionid
     */
    private String unionId;

    /**
     * vip等级
     */
    private Integer vipLevel;

    /**
     * 用户类型 0 - 普通用户  1 - 商家用户  2 - 车检员
     */
    private Integer userType;

    /**
     * 用户购买成功的次数
     */
    private Long buyCount;

    /**
     * 是否是平台管理员
     */
    private Integer isAdmin;

    /**
     * sysuser 表的id
     */
    private Long sysUserId;

    /**
     * 当前拥有的积分
     */
    @Excel(name = "积分")
    private Double integral;

    /**
     * 当前拥有的积分
     */
    private Double integralFreez;

    /**
     * 性别
     */
    private Integer sex;

    /**
     * 所属小区id
     */
    private Integer estateId;

    private Integer propertyId;

    /**
     * 邀请人id
     */
    private Integer agId;


    private Double lng;
    private Double lat;


    @TableField(exist = false)
	private String estateName;


	@TableField(exist = false)
	private String beginDate;

	@TableField(exist = false)
	private String endDate;


    @TableField(exist = false)
    private Integer address;
}
